/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author User
 */
@Entity
@Table(name = "confirmacion")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Confirmacion.findAll", query = "SELECT c FROM Confirmacion c"),
    @NamedQuery(name = "Confirmacion.findByIdConfirmacion", query = "SELECT c FROM Confirmacion c WHERE c.idConfirmacion = :idConfirmacion"),
    @NamedQuery(name ="Confirmacion.findDuplicity", query = "SELECT c FROM Confirmacion c WHERE c.idConfirmacion = :idConfirmacion")})
public class Confirmacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idConfirmacion")
    private Integer idConfirmacion;
    @JoinColumn(name = "Register_idRegister", referencedColumnName = "idRegister")
    @ManyToOne
    private Register registeridRegister;
    @JoinColumn(name = "Eventos_idEventos", referencedColumnName = "idEventos")
    @ManyToOne
    private Eventos eventosidEventos;

    public Confirmacion() {
    }

    public Confirmacion(Integer idConfirmacion) {
        this.idConfirmacion = idConfirmacion;
    }

    public Integer getIdConfirmacion() {
        return idConfirmacion;
    }

    public void setIdConfirmacion(Integer idConfirmacion) {
        this.idConfirmacion = idConfirmacion;
    }

    public Register getRegisteridRegister() {
        return registeridRegister;
    }

    public void setRegisteridRegister(Register registeridRegister) {
        this.registeridRegister = registeridRegister;
    }

    public Eventos getEventosidEventos() {
        return eventosidEventos;
    }

    public void setEventosidEventos(Eventos eventosidEventos) {
        this.eventosidEventos = eventosidEventos;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idConfirmacion != null ? idConfirmacion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Confirmacion)) {
            return false;
        }
        Confirmacion other = (Confirmacion) object;
        if ((this.idConfirmacion == null && other.idConfirmacion != null) || (this.idConfirmacion != null && !this.idConfirmacion.equals(other.idConfirmacion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itschapala.dsw2.modelo.Confirmacion[ idConfirmacion=" + idConfirmacion + " ]";
    }
    
}
